home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 3.iso / dist / fw_apache.idb / usr / freeware / apache / include / hsregex.h.z / hsregex.h
C/C++ Source or Header  |  2001-01-10  |  2KB  |  92 lines

  1. /* DON'T EVEN THINK ABOUT EDITING THIS, go see regex/Makefile,
  2.  * search for mkh */
  3. #ifndef _REGEX_H_
  4. #define    _REGEX_H_    /* never again */
  5. /* ========= begin header generated by ./mkh ========= */
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. /* === regex2.h === */
  11. #ifndef API_EXPORT
  12. #ifdef WIN32
  13. #define API_EXPORT(type)    __declspec(dllexport) type __stdcall
  14. #else
  15. #define API_EXPORT(type)    type
  16. #endif
  17. #endif
  18.  
  19. #ifndef ap_private_extern
  20. #if defined(DARWIN)
  21. #define ap_private_extern __private_extern__
  22. #else
  23. #define ap_private_extern
  24. #endif
  25. #endif
  26.  
  27. typedef off_t regoff_t;
  28. typedef struct {
  29.     int re_magic;
  30.     size_t re_nsub;        /* number of parenthesized subexpressions */
  31.     const char *re_endp;    /* end pointer for REG_PEND */
  32.     struct re_guts *re_g;    /* none of your business :-) */
  33. } regex_t;
  34. typedef struct {
  35.     regoff_t rm_so;        /* start of match */
  36.     regoff_t rm_eo;        /* end of match */
  37. } regmatch_t;
  38.  
  39.  
  40. /* === regcomp.c === */
  41. API_EXPORT(int) regcomp(regex_t *, const char *, int);
  42. #define    REG_BASIC    0000
  43. #define    REG_EXTENDED    0001
  44. #define    REG_ICASE    0002
  45. #define    REG_NOSUB    0004
  46. #define    REG_NEWLINE    0010
  47. #define    REG_NOSPEC    0020
  48. #define    REG_PEND    0040
  49. #define    REG_DUMP    0200
  50.  
  51.  
  52. /* === regerror.c === */
  53. #define    REG_NOMATCH     1
  54. #define    REG_BADPAT     2
  55. #define    REG_ECOLLATE     3
  56. #define    REG_ECTYPE     4
  57. #define    REG_EESCAPE     5
  58. #define    REG_ESUBREG     6
  59. #define    REG_EBRACK     7
  60. #define    REG_EPAREN     8
  61. #define    REG_EBRACE     9
  62. #define    REG_BADBR    10
  63. #define    REG_ERANGE    11
  64. #define    REG_ESPACE    12
  65. #define    REG_BADRPT    13
  66. #define    REG_EMPTY    14
  67. #define    REG_ASSERT    15
  68. #define    REG_INVARG    16
  69. #define    REG_ATOI    255    /* convert name to number (!) */
  70. #define    REG_ITOA    0400    /* convert number to name (!) */
  71. API_EXPORT(size_t) regerror(int, const regex_t *, char *, size_t);
  72.  
  73.  
  74. /* === regexec.c === */
  75. API_EXPORT(int) regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
  76. #define    REG_NOTBOL    00001
  77. #define    REG_NOTEOL    00002
  78. #define    REG_STARTEND    00004
  79. #define    REG_TRACE    00400    /* tracing of execution */
  80. #define    REG_LARGE    01000    /* force large representation */
  81. #define    REG_BACKR    02000    /* force use of backref code */
  82.  
  83.  
  84. /* === regfree.c === */
  85. API_EXPORT(void) regfree(regex_t *);
  86.  
  87. #ifdef __cplusplus
  88. }
  89. #endif
  90. /* ========= end header generated by ./mkh ========= */
  91. #endif
  92.